package com.gqr.springcloud;

import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.config.server.EnableConfigServer;

@SpringBootApplication
@EnableConfigServer
@EnableDiscoveryClient
public class ConfigServerEurekaApplication {

    public static void main(String[] args) throws NoSuchMethodException {
        new SpringApplicationBuilder(ConfigServerEurekaApplication.class)
                .web(WebApplicationType.SERVLET)
                .run(args);
        // 获取配置文件的不同url姿势，都是get请求
        // http://localhost:60000/{label}/{application}-{profile}.json
        // 以上后缀可以换成.yml, .properties, 如果不指定{label}的话 默认是master/main  当前低版本可能main不生效？？
        // http://localhost:60000/{application}/{profile}/{label}
    // http://localhost:60000/main/config-consumer-dev.yml
    // http://localhost:60000/main/config-consumer-dev.properties
    // http://localhost:60000/main/config-consumer-dev.json
    // http://localhost:60000/config-consumer/dev/main/

    }

}